#include <stdio.h>
#include <string.h>

#define MAX_LEN 201

int main()
{
    char s1[MAX_LEN], s2[MAX_LEN];
    scanf("%s %s", s1, s2);
    int len1 = strlen(s1), len2 = strlen(s2);
    // 去除前导0
    int i = 0, j = 0;
    while (s1[i] == '0' && i < len1) i++;
    while (s2[j] == '0' && j < len2) j++;
    // 比较整数部分
    while (i < len1 && j < len2 && s1[i] == s2[j]) {
        i++; j++;
    }
    if (i == len1 && j == len2) {  // 整数部分相等
        int k = len1, l = len2;
        // 去除末尾0
        while (s1[k-1] == '0' && k > i) k--;
        while (s2[l-1] == '0' && l > j) l--;
        // 比较小数部分
        while (i < k && j < l && s1[i] == s2[j]) {
            i++; j++;
        }
        if (i == k && j == l) printf("The two numbers are equal.\n");
        else printf("The two numbers are not equal.\n");
    } else {
        printf("The two numbers are not equal.\n");
    }
    return 0;
}
